package com.cyt.website.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.website.model.po.WebsiteFriendlyLink;
import com.cyt.website.model.vo.WebsiteFriendlyLinkVo;
import com.cyt.sys.model.po.SysUser;
import com.cyt.sys.service.BaseService;
import org.springframework.cache.annotation.CacheEvict;

import java.util.List;

/**
 * 官网友情链接-官网友情链接Service层接口类
 *
 * @author congcong tao
 * @date 2019-8-12 14:16:01
 */
public interface WebsiteFriendlyLinkService extends BaseService<WebsiteFriendlyLink> {

    /**
     * 查询对象集合
     *
     * @param websiteFriendlyLinkVo 对象
     * @return List 对象集合
     * @author congcong tao
     * @date 2019-8-12 14:16:01
     */
    List<WebsiteFriendlyLink> listExample(WebsiteFriendlyLinkVo websiteFriendlyLinkVo);

    /**
     * 分页查询
     *
     * @param websiteFriendlyLinkVo 接受参数对象
     * @param pageNum          分页数
     * @param pageSize         每页显示条数
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-12 14:16:01
     */
    ReturnResult page(WebsiteFriendlyLinkVo websiteFriendlyLinkVo, int pageNum, int pageSize);

    /**
     * 添加或更新
     *
     * @param websiteFriendlyLinkVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-12 14:16:01
     */
    @CacheEvict(value={"cacheWebsiteFriendlyLink"}, allEntries = true)
    ReturnResult addOrUpdate(WebsiteFriendlyLinkVo websiteFriendlyLinkVo, SysUser sysUser);

    /**
     * 根据条件逻辑删除
     *
     * @param websiteFriendlyLinkVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-12 14:16:01
     */
    @CacheEvict(value={"cacheWebsiteFriendlyLink"}, allEntries = true)
    ReturnResult remove(WebsiteFriendlyLinkVo websiteFriendlyLinkVo, SysUser sysUser);

    /**
     * 根据条件物理删除
     *
     * @param websiteFriendlyLinkVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author congcong tao
     * @date 2019-8-12 14:16:01
     */
    @CacheEvict(value={"cacheWebsiteFriendlyLink"}, allEntries = true)
    ReturnResult delete(WebsiteFriendlyLinkVo websiteFriendlyLinkVo, SysUser sysUser);
}